package com.snjx.rpc;

import com.snjx.rpc.proxy.RPCProxy;
import com.snjx.rpc.service.HelloRpc;
import com.snjx.rpc.service.impl.HelloRpcImpl;

import java.util.concurrent.TimeUnit;

public class main {
    public static void main(String [] args) throws InterruptedException {
        while (true) {
            HelloRpc helloRpc = new HelloRpcImpl();
            helloRpc = RPCProxy.create(helloRpc);
            System.err.println(helloRpc.hello("rpc"));
            TimeUnit.SECONDS.sleep(1);
        }
    }
}
